package com.smart.manager.system.entities.views;

import com.smart.common.entities.core.BaseView;
import io.ebean.annotation.View;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.validation.constraints.NotBlank;

/**
 * 系统-部门管理
 *
 * @author Xiaxuqiu
 */

@Data
@Entity
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@View(name = "system_dept")
public class DeptView extends BaseView {


    /**
     * 部门代码
     */
    @Id
    @NotBlank(message = "部门代码 不能为空")
    @Length(max = 30, message = "部门代码 不能超过30个字符")
    @ApiModelProperty("部门代码")
    private String code;
    /**
     * 部门名称
     */
    @ApiModelProperty(  "部门名称")
    private String name;

}